<div id="errorMessage" class="errorMessageBig" style="display: <?=$errorDivDisplay; ?>;"><?=$errorMessage; ?></div>

<? if ($step == 1) { ?>
<h2 style="height: 30px;">
	<? if ($action != 'newAccount') { ?>
	Step 1 of 2: Your email address
	<? } ?>
</h2>				
<form action="<?=$_SERVER['PHP_SELF']; ?>?checkEmail=1" method="POST">
	<input type="hidden" name="itemType" value="<?=$itemType; ?>" />
	<input type="hidden" name="itemID" value="<?=$itemID; ?>" />
	<input type="hidden" name="orgFlag" value="<?=$orgFlag; ?>" />
	<input type="hidden" name="action" value="<?=$action; ?>" />

	<p><label class="required">Enter your email address</label>
	<input type="text" style="width: 310px;" name="email" id="email" value="<?=$email; ?>" />
	</p>
	<div style="margin-left: 250px;">
	<input type="submit" value="<? echo $translate->_('Next'); ?>" class="buttonBlue" title="<? echo $translate->_('Next'); ?>" />
	</div>		
</form>
<? } elseif ($step == 2) { ?>
<h2 style="height: 30px;">Step 2 of 2: Your account information</h2>				
<form action="<?=$_SERVER['PHP_SELF']; ?>?saveAccount=1" onSubmit="return validateForm();" method="POST">
	<input type="hidden" name="email" value="<?=$email; ?>" />
	<input type="hidden" name="itemType" value="<?=$itemType; ?>" />
	<input type="hidden" name="itemID" value="<?=$itemID; ?>" />
	<input type="hidden" name="memberID" value="<?=$memberID; ?>" />
	<input type="hidden" name="eventTitle" value="<?=$eventArray['EventName']; ?>" />
	<input type="hidden" name="libraryTitle" value="<?=$libraryItemArray['Title']; ?>" />
	<input type="hidden" name="orgFlag" value="<?=$orgFlag; ?>" />
	<input type="hidden" name="action" value="<?=$action; ?>" />
	
	<p><label class="required">Your Name [First, Last]</label>
	<input type="text" style="width: 145px; margin-right: 11px;" name="nameFirst" id="nameFirst" value="<?=$nameFirst; ?>" />
	<input type="text" style="width: 145px;" name="nameLast" id="nameLast" value="<?=$nameLast; ?>" />
	</p>
	
	<p><label>Mailing Address</label>
	<textarea style="width: 310px; height: 40px;" id="address" name="address"><?=$address; ?></textarea>
	</p>
	
	<p><label>City</label>
	<input type="text" style="width: 310px;" name="city" id="city" value="<?=$city; ?>" />
	</p>
	
	<p><label>State, Zip Code</label>
	<select name="state" id="state" size="1" style="width: 200px; margin-right: 7px;">
	<? include('admin/includes/states.html'); ?>
	</select>
	<input type="text" style="width: 100px;" name="zip" id="zip" value="<?=$zip; ?>" />
	</p>
	
	<p><label>Phone</label>
	<input type="text" style="width: 310px;" name="phone" id="phone" value="<?=$phone; ?>" />
	</p>
	
	<p><label class="required">I am a...</label>
	<input type="radio" name="iAm" id="radioParent" value="Parent" 
	<? if ($iAm == 'Parent') { echo ' checked '; } ?>
	onClick="togglePanel('Parent');" /> Parent&nbsp;&nbsp;&nbsp;
	<input type="radio" name="iAm" id="radioProfessional" value="Professional" 
	<? if ($iAm == 'Professional') { echo ' checked '; } ?>
	onClick="togglePanel('Professional');" /> Professional&nbsp;&nbsp;&nbsp;
	<input type="radio" name="iAm" id="radio0" value="0" 
	<? if ( empty($iAm) || ($iAm == 0) ) { echo ' checked '; } ?>
	onClick="togglePanel(0);" /> Neither
	</p>
	
	<div style="margin-left: 250px; display: none;" id="panelParent">
		<div style="float: left; width: 100px;"><p>Childs' Age</p></div>						
		<div style="float: left;">
			<select id="childAgeYr" name="childAgeYr" style="width: 100px;" size="1">
			<option>Year</option>
			<?
		for($a=1;$a<=18;$a++) {
			echo '<option value="'.$a.'">'.$a.'</option>';
		}
		?>
		</select>
		<select id="childAgeMonth" name="childAgeMonth" style="width: 102px;" size="1">
		<option>Month</option>
		<?
		for($a=1;$a<=11;$a++) {
			echo '<option value="'.$a.'">'.$a.'</option>';
		}
		?>
		</select>
		</div>
		<div style="clear: left;"></div>
		<div style="float: left; width: 100px;"><p>Disability</p></div>
		<div style="float: left;">
			<select name="disability" id="disability" size="1" style="width: 206px;">
			<option>Select...</option>
			<?
			$disData->getDisabilities();
			echo $disData->returnData();
			?>
			</select>
		</div>
		<div style="clear: left;"></div>
	</p>
	</div>
	<div style="margin-left: 250px; display: none;" id="panelProfessional">
		<div style="float: left; width: 100px;"><p>Title</p></div>						
		<div style="float: left;"><input type="text" style="width: 200px;" name="proTitle" id="proTitle" /></div>
		<div style="clear: left;"></div>
		<div style="float: left; width: 100px;"><p>Organization</p></div>						
		<div style="float: left;"><input type="text" style="width: 200px;" name="proOrg" id="proOrg" /></div>
		<div style="clear: left;"></div>
	</div>
		
	<div style="margin-left: 250px;">
	<input type="submit" value="<? echo $translate->_($buttonLabel); ?>" class="buttonBlue" title="<? echo $translate->_($buttonLabel); ?>" />
	</div>					
	</form>	
<? } ?>				